/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ObjectFileOptionsClient;

import Adaptor.A_Changle;
import InterfaceClient.IChat;
import Packets.pkValue;
import StaticClass.ArrSocket;
import Strategy.A_Interface;
import Strategy.SIPack;
import Strategy.SI_Chat;
import ThreadClient.ThreadMain;
import java.io.*;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Oho doc va ghi 1 file 
 */
public class ObjectFile implements ObjectFileOption{
    Socket sk ;
    ObjectOutputStream out ;
    ObjectInputStream in ;
    public  ObjectFile(Socket sk,ObjectInputStream in,ObjectOutputStream out )
    {
        this.sk = sk ;
        this.in = in;
        this.out = out;
    }
    
    public void progessWrite(pkValue pk) {
       A_Interface ai = new A_Interface(in,out);
       ai.Check(pk,  "WRITE", sk);
    }

    public void progessRead( ) {
     
             A_Interface ai = new A_Interface(in,out);
            
                       // in = new ObjectInputStream(sk.getInputStream());
                       //   pkValue  pk1 = (pkValue) in.readObject();
                           //chat
                           ai.Check(null,  "READ", sk);
                         
       
       
        
    }
    
}
